package com.wushi.lenovo.asia5b.app_ui.good.adapter;

import android.support.annotation.Nullable;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wushi.lenovo.asia5b.R;
import com.wushi.lenovo.asia5b.app_model.good.goodbean.OrderGoodBean;

import java.util.List;

public class ButtonAdapter extends BaseQuickAdapter<OrderGoodBean.ActionBean, BaseViewHolder> {
    public ButtonAdapter(@Nullable List<OrderGoodBean.ActionBean> data) {
        super(R.layout.item_order_button_adaper, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, OrderGoodBean.ActionBean item) {
        helper.setText(R.id.tv_order_button, item.getName());
        TextView tv_order_button = helper.getView(R.id.tv_order_button);
        tv_order_button.setSelected(item.getEnabled() == 1);
    }
}
